//
//  HomeCollectionScrollHeaderView.m
//  huashiedu
//
//  Created by oceans on 2018/8/26.
//  Copyright © 2018年 hema. All rights reserved.
//

#import "HomeCollectionScrollHeaderView.h"

@interface HomeCollectionScrollHeaderView () <SDCycleScrollViewDelegate>

@end

@implementation HomeCollectionScrollHeaderView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self setup];
    }
    return self;
}

- (void)setup {
    
    self.scrollView = [[SDCycleScrollView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenWidth * 0.396)];
    _scrollView.delegate = self;
    [self addSubview:_scrollView];
}

- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index {
    
    [_delegate didSelectImageAtIndex:index];
}

@end
